XML (eXtensible Markup Language) is a universal data format for publishing, storing, and sharing structured documents. XML can be used to exchange data between computers since it has a standard format that is consistent over different forms of hardware and operating systems. Marked-up text can be classified by XML node type, such as “document,” “element,” “attribute,” or “text,” among others. In an XML document, the logical constructs known as character data and attribute values consist of sequences, or strings, of characters, in which each character can either manifest directly (representing itself), or be represented by a series of characters called a character reference, of which there are two types: (i) a numeric character reference; and (ii) a character entity reference.
Structured Query Language (SQL) is used to communicate with a database. According to ANSI (American National Standards Institute), SQL is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database.
SQL/XML is an extension of the SQL language standard that includes XML publishing functions for converting relational data into XML. These publishing functions make it easy to publish database data in an XML document by creating tagged XML documents, for example, in character large objects. A SELECT statement can be used to assemble the required XML nodes, and capture the marked-up text, rather than having to write a program to generate the required XML. An INSERT statement can be used as well to write the generated text to a table.